<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>New Functions</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration52.parameters.html">New Parameters</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration52.methods.html">New Methods</a></div>
 <div class="up"><a href="migration52.html">Migrating from PHP 5.1.x to PHP 5.2.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration52.functions" class="section">
  <h2 class="title">New Functions</h2>
  <p class="para">
   PHP 5.2.x introduced some new functions:
  </p>

  <p class="para">PHP Core:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.array-fill-keys.html" class="function">array_fill_keys()</a></span>
     - Create an array using the elements of the first parameter as keys,
     each initialized to <em>val</em>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.error-get-last.html" class="function">error_get_last()</a></span>
     - Get the last occurred error as associative array. Returns <strong><code>NULL</code></strong>
     if there hasn&#039;t been an error yet
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.image-type-to-extension.html" class="function">image_type_to_extension()</a></span>
     - Get file extension for image-type returned by
     <span class="function"><a href="function.getimagesize.html" class="function">getimagesize()</a></span>, <span class="function"><a href="function.exif-read-data.html" class="function">exif_read_data()</a></span>,
     <span class="function"><a href="function.exif-thumbnail.html" class="function">exif_thumbnail()</a></span>, <span class="function"><a href="function.exif-imagetype.html" class="function">exif_imagetype()</a></span>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.memory-get-peak-usage.html" class="function">memory_get_peak_usage()</a></span>
     - Returns the peak allocated by PHP memory
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.sys-get-temp-dir.html" class="function">sys_get_temp_dir()</a></span>
     - Returns directory path used for temporary files. (Added in 5.2.1)
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.timezone-abbreviations-list.html" class="function">timezone_abbreviations_list()</a></span>
     - Returns associative array containing DST, offset and the timezone name
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.timezone-identifiers-list.html" class="function">timezone_identifiers_list()</a></span>
     - Returns numerically indexed array with all timezone identifiers
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.timezone-name-from-abbr.html" class="function">timezone_name_from_abbr()</a></span>
     - Returns the timezone name from abbreviation
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.stream-socket-shutdown.html" class="function">stream_socket_shutdown()</a></span>
     - Causes all or part of a full-duplex connection on the socket
     associated with stream to be shut down. As of PHP 5.2.1.
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.image.html" class="link">Image</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.imagegrabscreen.html" class="function">imagegrabscreen()</a></span>
     - Grabs a screenshot of the whole screen. As of PHP 5.2.2.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.imagegrabwindow.html" class="function">imagegrabwindow()</a></span>
     - Captures a window. As of PHP 5.2.2.
    </span>
   </li>
  </ul>

  <p class="para"><a href="book.libxml.html" class="link">libXML</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.libxml-disable-entity-loader.html" class="function">libxml_disable_entity_loader()</a></span>
     - Disable the ability to load external entities. As of PHP 5.2.11.
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.mbstring.html" class="link">mbstring</a>:</p>
  <ul class="itemizedlist">
   
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.mb-stripos.html" class="function">mb_stripos()</a></span>
     - Finds position of first occurrence of a string within another,
     case insensitive
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.mb-stristr.html" class="function">mb_stristr()</a></span>
     - Finds first occurrence of a string within another, case insensitive
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.mb-strrchr.html" class="function">mb_strrchr()</a></span>
     - Finds the last occurrence of a character in a string within another
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.mb-strrichr.html" class="function">mb_strrichr()</a></span>
     - Finds the last occurrence of a character in a string within another,
     case insensitive
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.mb-strripos.html" class="function">mb_strripos()</a></span>
     - Finds position of last occurrence of a string within another,
     case insensitive
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.mb-strstr.html" class="function">mb_strstr()</a></span>
     - Finds first occurrence of a string within another
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.ming.html" class="link">ming</a> (As of PHP 5.2.1):</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     void ming_setSWFCompression(int num)
     - Sets output compression
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     void swfmovie::namedanchor(string name)
     - Creates anchor
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     void swfmovie::protect([string password])
     - Protects
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.openssl.html" class="link">openssl</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.openssl-csr-get-public-key.html" class="function">openssl_csr_get_public_key()</a></span>
     - Extracts public key from a CERT and prepares it for use
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.openssl-csr-get-subject.html" class="function">openssl_csr_get_subject()</a></span>
     - Returns the subject of a CERT
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.openssl-pkey-get-details.html" class="function">openssl_pkey_get_details()</a></span>
     - Returns an array with the key details (bits, pkey, type)
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.spl.html" class="link">spl</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.spl-object-hash.html" class="function">spl_object_hash()</a></span>
     - Return hash id for given object
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     int iterator_apply(Traversable it, mixed function [, mixed params])
     - Calls a function for every element in an iterator
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.pcre.html" class="link">pcre</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.preg-last-error.html" class="function">preg_last_error()</a></span>
     - Returns the error code of the last regex execution
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.pgsql.html" class="link">pgsql</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.pg-field-table.html" class="function">pg_field_table()</a></span>
     - Returns the name of the table field belongs to, or table&#039;s oid
     if <em>oid_only</em> is <strong><code>TRUE</code></strong>
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.posix.html" class="link">posix</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.posix-initgroups.html" class="function">posix_initgroups()</a></span>
     - Calculate the group access list for the user specified in name
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.gmp.html" class="link">gmp</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.gmp-nextprime.html" class="function">gmp_nextprime()</a></span>
     - Finds next prime number
    </span>
   </li>
  </ul>

  <p class="para"><a href="ref.xmlwriter.html" class="link">xmlwriter</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.xmlwriter-full-end-element.html" class="function">xmlwriter_full_end_element()</a></span>
     - End current element - returns <strong><code>FALSE</code></strong> on error
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.xmlwriter-write-raw.html" class="function">xmlwriter_write_raw()</a></span>
     - Write text - returns <strong><code>FALSE</code></strong> on error
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.xmlwriter-start-dtd-entity.html" class="function">xmlwriter_start_dtd_entity()</a></span>
     - Create start DTD Entity - returns <strong><code>FALSE</code></strong> on error
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.xmlwriter-end-dtd-entity.html" class="function">xmlwriter_end_dtd_entity()</a></span>
     - End current DTD Entity - returns <strong><code>FALSE</code></strong> on error
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.xmlwriter-write-dtd-entity.html" class="function">xmlwriter_write_dtd_entity()</a></span>
     - Write full DTD Entity tag - returns <strong><code>FALSE</code></strong> on error
    </span>
   </li>
  </ul>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration52.parameters.html">New Parameters</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration52.methods.html">New Methods</a></div>
 <div class="up"><a href="migration52.html">Migrating from PHP 5.1.x to PHP 5.2.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
